package com.kfm.am;

import java.util.List;

public class ListDemo02 {

    public static void main(String[] args) {
        Student stu = new Student("张三", 20);
        Student stu1 = new Student("李四", 20);
        Student stu2 = new Student("王五", 20);
        Student stu3 = new Student("孙六", 20);
        List students = List.of(stu1, stu2, stu3, stu);
        List list = students.subList(0, 2); // [0, 2)
        System.out.println(list.size());
//        Student s = (Student)students.get(0);
//        s.setName("zhangThree");

    }
}
